package com.wdm.sms.commonutil.config.inteceptor.springsecurity.custom;

import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.core.userdetails.UsernameNotFoundException;
import org.springframework.stereotype.Component;

@Component
//可以不用这个类，impl直接实现spring的UserDetailsService
//2.6以后 Security先于Spring 加载，手动注入的customUserDetailsService，由于spring 还没有启动，导致无法注入userDao,所以一直报null
public interface UserDetailsService extends org.springframework.security.core.userdetails.UserDetailsService {

    /**
     * 根据用户名获取用户对象（获取不到直接抛异常）
     */
    @Override
    UserDetails loadUserByUsername(String username) throws UsernameNotFoundException;
}
